/*
 * OrderLine.java
 *
 * Created on March 29, 2007, 11:08 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.samlam;

/**
 *
 * @author BrianB
 */
public class OrderLine {
   private String olguid;
    private PurchaseOrder order;
    private VendorItem vendoritem;
    private int quantity;
    private boolean dirty = false;
    private boolean alreadyInDB = false;
    
    /** Creates a new instance of OrderLineBO */
    public OrderLine(String id) {
        this.olguid = id;
    }
    
    public String getOlguid() {
        return olguid;
    }
    
    public PurchaseOrder getOrder() {
        return order;
    }
    
    public void setOrder(PurchaseOrder order) {
        this.order = order;
    }
    
    public VendorItem getVendoritem() {
        return vendoritem;
    }
    
    public void setVendoritem(VendorItem vendoritem) {
        this.vendoritem = vendoritem;
        this.setDirty(true);
    }
    
    public int getQuantity() {
        return quantity;
    }
    
    public void setQuantity(int quantity) {
        this.quantity = quantity;
        this.setDirty(true);
    }

    public boolean isDirty() {
        return dirty;
    }

    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }

    public boolean isAlreadyInDB() {
        return alreadyInDB;
    }

    public void setAlreadyInDB(boolean alreadyInDB) {
        this.alreadyInDB = alreadyInDB;
    }
    
}